package com.awesome.drag1.extension.entities

import com.awesome.drag1.core.DraggableParamsInfo
import java.io.Serializable

/**
 * 拖拽的图片信息
 * draggableInfo: 拖拽信息
 */
data class DraggableImageInfo(
    var originImg: String = "",
    var thumbnailImg: String = "",
    var draggableInfo: DraggableParamsInfo = DraggableParamsInfo(),
    val imageSize: Long = 0,
    val imageCanDown: Boolean = true
) : Serializable {
    fun adjustImageUrl() {

        if (originImg.isNotEmpty() && thumbnailImg.isNotEmpty()) return

        if (originImg.isEmpty() && thumbnailImg.isNotEmpty()) {
            originImg = thumbnailImg
        } else {
            thumbnailImg = originImg
        }
    }
}
